<%@ page language="java" import="java.util.*,bookstore.database.pojo.*,bookstore.tools.*"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String isbn = request.getParameter("bookISBN");
	Customer cus = (Customer) session.getAttribute("customer");
	if (cus == null) {
		request.getRequestDispatcher("login.jsp").forward(request,
				response);
	} else {
		if (!Tools.isCustomerSeller(cus.getEmail())) {
			request.getRequestDispatcher("apply.jsp").forward(request,
					response);
		}
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>填写书籍信息</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link rel="stylesheet" type="text/css" href="/css/my.css">

	</head>

	<body>
	<!-- <form action="saveBook.do" method="post"> -->	
	
			<table width="80%" border="0" align="center">
				<tr>
					<td><jsp:include flush="true" page="head.jsp"></jsp:include></td>
				</tr>
				
				<tr>
					<td><form action="saveBook.do" method="post" enctype="multipart/form-data" >
						<table width="100%" border="1" bordercolor="#00FF00">
							<tr>
								<td class="style5">
									填写书籍信息
									<hr />
								</td>
							</tr>
							<tr>
								<td>
									ISBN号：<%=isbn%>
								</td>
							</tr>
							<tr>
								<td>
									书名：
									<input type="text" name="bookname" />
								</td>
							</tr>
							<tr>
								<td>
									作者：
									<input type="text" name="author" />
								</td>
							</tr>
							<tr>
								<td>
									出版社：
									<input type="text" name="press" />
								</td>
							</tr>
							<tr>
								<td >
									定价：
									<input type="text" name="bookprice" />
								</td>
							</tr>
							<tr>
								<td>
									类型：
									<select name="booktype">
										<c:forEach items="${applicationScope.bookTypes}" var="type">
											<option>
												<c:out value="${type.typeName}" />
											</option>
										</c:forEach>
									</select>

								</td>
							</tr>
							<tr>
								<td>
									图片：
									<input type="file" name="bookpic" />
									<hr />
								</td>
							</tr>
							<tr>
								<td>
									<input type="submit" name="Submit2" value="下一步" " />
								</td>
							</tr>
						</table></form>
					</td>
				</tr>
				<tr>
					<td><jsp:include flush="true" page="tail.jsp"></jsp:include></td>
				</tr>
			</table>
		
	</body>
</html>
